var a_right1 = echarts.init(document.getElementById('r1'), "dark");

var a_right1_option = {
    title: {
        text: ''
    },
    tooltip: {
        trigger: 'axis'
    },
    legend: {
        left: 'center',
        data: ['xx外呼', '产品推销', 'xx专案', '社区访问', '满意度回访']
    },
    radar: [{
            indicator: [
                { text: '接通率', max: 100 },
                { text: '呼损率', max: 100 },
                { text: '成功率', max: 100 },
                { text: '失败率', max: 100 }
            ],
            center: ['30%', '40%'],
            radius: 80
        },
        {
            indicator: (function() {
                var res = [];
                for (var i = 1; i <= 12; i++) {
                    res.push({ text: i + '月', max: 100 });
                }
                return res;
            })(),
            center: ['70%', '70%'],
            radius: 70
        }
    ],
    series: [{
            type: 'radar',
            tooltip: {
                trigger: 'item'
            },
            areaStyle: {},
            data: [{
                value: [60, 73, 85, 40],
                name: 'xx外呼'
            }]
        },
        {
            type: 'radar',
            radarIndex: 1,
            areaStyle: {},
            data: [{
                    value: [85, 90, 90, 95, 95],
                    name: '产品推销'
                },
                {
                    value: [95, 80, 95, 90, 93],
                    name: 'xx专案'
                }
            ]
        },
        {
            type: 'radar',
            radarIndex: 1,
            areaStyle: {},
            data: [{
                    name: '社区访问',
                    value: [2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 75.6, 82.2, 48.7, 18.8, 6.0, 2.3],
                },
                {
                    name: '满意度回访',
                    value: [2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 35.6, 62.2, 32.6, 20.0, 6.4, 3.3]
                }
            ]
        }
    ]
};
a_right1.setOption(a_right1_option);
window.addEventListener("resize", () => {
    a_right1.resize();
});